package com.zc.chapter41.configuration;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestMain {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(TestConfiguration.class);


        TestBean testBean = (TestBean) context.getBean("testBean");
        testBean.sayHello();

        TestBean testBean2 = (TestBean) context.getBean("testBean");
        testBean2.sayHello();
        System.out.println(testBean2);
    }
}
